﻿@model ScrumProject.Models.User

@{
    ViewBag.Title = "MyProfile";
}

<h2>MyProfile</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <table class="table">
    <thead></thead>
    <tbody>
        <tr>
            <td>
                @Html.LabelFor(model => model.Username)
            </td>
            <td>
                @Html.EditorFor(model => model.Username)
            </td>
            <td>
                @Html.ValidationMessageFor(model => model.Username)
            </td>
        </tr>@*
          <tr>
            <td>
                @Html.LabelFor(model => model.Password)
            </td>
            <td>
                @Html.EditorFor(model => model.Password)
            </td>
            <td>
                @Html.ValidationMessageFor(model => model.Password)
            </td>
        </tr>*@
         <tr>
            <td>
                 @Html.LabelFor(model => model.Name)
            </td>
            <td>
                @Html.EditorFor(model => model.Name)
            </td>
            <td>
                @Html.ValidationMessageFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td>
                 @Html.LabelFor(model => model.Surname)
            </td>
            <td>
                @Html.EditorFor(model => model.Surname)
            </td>
            <td>
               @Html.ValidationMessageFor(model => model.Surname)
            </td>
        </tr>
        <tr>
            <td>
                 @Html.LabelFor(model => model.Email)
            </td>
            <td>
                @Html.EditorFor(model => model.Email)
            </td>
            <td>
               @Html.ValidationMessageFor(model => model.Email)
            </td>
        </tr>@*
        <tr>
            <td>
                 @Html.LabelFor(model => model.isAdmin)
            </td>
            <td>
                @Html.EditorFor(model => model.isAdmin)
            </td>
            <td>
               @Html.ValidationMessageFor(model => model.isAdmin)
            </td>
        </tr>*@
        <tr>
            <td>
               @Html.HiddenFor(model => model.Id)
               @Html.HiddenFor(model => model.isAdmin)
               @Html.HiddenFor(model => model.Password)
            </td>
            <td>
               <input type="submit" value="Save" class="btn" />
            </td>
            <td>
            </td>
        </tr>
    </tbody>
    </table>
}
<div>
    <input type="button" value="Back" class="btn" onclick="history.go(-1)">
</div>